﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Hydra.UrlMon.Enumerations;

namespace Hydra.UrlMon.Implementation
{
    public class BindInfo
    {
        /// <summary> Size of the structure, in bytes. </summary>
        public int cbSize;                      // cbSize: ULONG;

        /// <summary> Behavior of this field is moniker-specific. For URL monikers, this string is appended to the URL when the bind operation is started. Like other OLE strings, this value is a Unicode string that the client should allocate using CoTaskMemAlloc. The URL moniker frees the memory later. </summary>
        //[MarshalAs(UnmanagedType.LPWStr)]
        public IntPtr szExtraInfo;              // szExtraInfo: LPWSTR;

        /// <summary> Data to be used in a PUT or POST operation specified by the dwBindVerb member. </summary>
        public StorageMedium stgmedData; // stgmedData: TStgMedium;

        /// <summary> Flag from the BINDINFOF enumeration that determines the use of URL encoding during the binding operation. This member is specific to URL monikers. </summary>
        public BindInfoFlags grfBindInfoF; // 

        /// <summary> Value from the BINDVERB enumeration specifying an action to be performed during the bind operation. </summary>
        public BindVerb dwBindVerb;

        /// <summary> BSTR specifying a protocol-specific custom action to be performed during the bind operation (only if dwBindVerb is set to BINDVERB_CUSTOM). </summary>
        //[MarshalAs(UnmanagedType.LPWStr)]
        public IntPtr szCustomVerb;

        /// <summary> Size of the data provided in the stgmedData member. </summary>
        public int cbstgmedData;

        /// <summary> Reserved. Must be set to 0. </summary>
        public int dwOptions;

        /// <summary> Reserved. Must be set to 0. </summary>
        public int dwOptionsFlags;

        /// <summary> Unsigned long integer value that contains the code page used to perform the conversion. </summary>
        public int dwCodePage;

        ///// <summary> SECURITY_ATTRIBUTES structure that contains the descriptor for the object being bound to and indicates whether the handle retrieved by specifying this structure is inheritable. </summary>
        //public NativeMethods.SECURITY_ATTRIBUTES securityAttributes;

        /// <summary> Interface identifier of the IUnknown interface referred to by pUnk. </summary>
        public Guid iid;

        /// <summary> Pointer to the IUnknown interface. </summary>
        public IntPtr punk;

        /// <summary> Reserved. Must be set to 0. </summary>
        public int dwReserved;
    }
}
